package me.zhengjie.modules.fund.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import me.zhengjie.base.BaseEntity;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Getter
@Setter
@ToString
@Table(name = "fund_net_value")
public class FundNetValue extends BaseEntity implements Serializable {

    @Id
    @Column(name = "id")
    @NotNull(groups = Update.class)
    @ApiModelProperty(value = "ID", hidden = true)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @NotNull
    @ApiModelProperty(value = "基金编码")
    private String code;

    @NotNull
    @ApiModelProperty(value = "净值日期")
    private Date date;

    @NotNull
    @ApiModelProperty(value = "单位净值")
    private BigDecimal netValue;

    @ApiModelProperty(value = "日增长率")
    private BigDecimal increaseRate;

    @ApiModelProperty(value = "申购状态")
    private String buyStatus;

    @ApiModelProperty(value = "赎回状态")
    private String saleStatus;
}
